<?php
class Login_m extends Model{
	
	function cek_login(){
		$this->db->where('ID_CABANG',$this->input->post('user_id'));
		$this->db->where('PASSWORD_C',md5($this->input->post('pass')));
		$hasil = $this->db->get('cabang');
		
		if ($hasil->num_rows == 1) {
			return TRUE;
		}
	}
	
	function get_data($username){
		$this->db->where('ID_CABANG',$username);
		return $this->db->get('cabang')->result();
	}
}